package com.chat.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@TableName("user")
@NoArgsConstructor
@AllArgsConstructor
public class User {
    @TableId(type = IdType.ASSIGN_ID)
    private String userId;              // 用户ID
    @JsonIgnore
    private String password;           // 登录密码
    private String username;          // 登录账号
    private String nickname;          // 显示昵称
    private String avatar;            // 头像URL
    private Byte status;              // 在线状态：0-离线 1-在线 2-忙碌
    private LocalDateTime lastOnlineTime; // 最后上线时间
    @TableLogic
    private Boolean isDeleted;
}
